<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>



  <!-- Banner and Login Start -->
    <div class="container">
      <div class="row">
        <div class="col-md-8" id="banner_1">
          <div id="carousel-generic" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
              <li data-target="#carousel-generic" data-slide-to="0" class="active"></li>
              <li data-target="#carousel-generic" data-slide-to="1"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
              <div class="item active">
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/big_img.jpg">
              </div>
              <div class="item">
                <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/big_img.jpg">
              </div>
            </div>

            <!-- Controls -->
            <a class="left carousel-control" href="#carousel-generic" role="button" data-slide="prev">
              <span class="glyphicon glyphicon-chevron-left"></span>
              <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#carousel-generic" role="button" data-slide="next">
              <span class="glyphicon glyphicon-chevron-right"></span>
              <span class="sr-only">Next</span>
            </a>
          </div>
        </div>
          
          
        <div class="col-md-4" style="padding:0;">
          <div class="com-user">
            <h3 class="text-center">校友登录</h3>
            
            <form class="com-login" role="form">
              <div class="com-login-cell form-group has-feedback col-md-8 col-md-offset-2">
                <label class="sr-only" for="user_phone">手机号码</label>
                <input type="text" class="form-control" id="user_phone" placeholder="手机号码">
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
              </div>
              <div class="com-login-check form-group has-feedback col-md-5 col-md-offset-2">
                <label class="sr-only" for="user_check">验证码</label>
                <input class="form-control" type="text" id="user_check" placeholder="验证码">
                <span class="glyphicon glyphicon-random form-control-feedback"></span>
              </div>
              <button type="submit" class="com-login-get btn btn-default col-md-3">获取验证码</button>
              <button type="submit" class="com-login-btn btn-lg btn btn-default col-md-8 col-md-offset-2">登录/注册</button>
            </form>
            
            <div class="com-download">
              <img src="/images/download_bg.png">
              <a href="javascript:;" class="com-ios"></a>
              <a href="javascript:;" class="com-andriod"></a>
            </div>
          </div>
        </div>
          
          
      </div>
    </div>
    <!-- Banner and Login End -->
    <!-- Main Block Start -->
    <div class="container">
      <div class="row">
        <!-- News -->
        <div class="com-news col-md-4">
          <div class="com-contain-nav">
            <a href="<?php echo Yii::app()->createUrl("new/index") ;?>" class="com-more pull-right"><span class="glyphicon glyphicon-th-large"></span> MORE</a>
            <div class="com-news-logo"></div>
          </div>
            
          <?php foreach($News as $k=>$v){ ?>
          <div class="com-contain">
            <a class="com-contain-in" href="<?php echo Yii::app()->createUrl("new/view",array('NewId'=>$v['id'])) ;?>">
              <div class="com-text-overflow" >
                   <div class="com-text-con" ><span class="glyphicon com-glyphicon-news"></span><?php echo $v['title'];?></div>
                   <div class="com-text-dotted" >…</div>
               </div>
                <div class="com-contain-con"><p><img src="<?php echo $v['min_banner_url']?>" class="com-contain-img pull-left"><?php echo $v['content']?></p></div>
            </a>
            <hr class="com-contain-hr">
          </div>
           
          <?php  }?>
        </div>
        
        
        
        <!-- Activity -->
        <div class="col-md-4">
          <div class="com-contain-nav">
              <a href="<?php echo Yii::app()->createUrl("activity/index") ;?>" class="com-more pull-right"><span class="glyphicon glyphicon-th-large"></span> MORE</a>
            <div class="com-activity-logo"></div>
          </div>
            
            <?php foreach($Activity as $k=>$v){ ?> 
                
                <?php if(isset($v['q_content'])){ ?>
                        <div class="com-contain">
                            <a class="com-contain-in" href="<?php echo Yii::app()->createUrl("activity/view",array('ActivityId'=>$v['id'],'type_id'=>$v['type_id'])) ;?>">
                              <div class="com-text-overflow" >
                                <div class="com-text-con" ><span class="glyphicon com-glyphicon-activity"></span><?php echo $v['title']; ?></div>
                                <div class="com-text-dotted" >…</div>
                              </div>
                              <div class="com-contain-con">
                                <div class="com-contain-vote pull-left text-center">参与投票</div>
                                <?php foreach($v['q_content'] as $kk=>$vv) {?>
                                    <div class="com-text-overflow" >
                                      <div class="com-text-con" ><?php echo $vv['sort'].'.'.$vv['q_content'];?></div>
                                      <div class="com-text-dotted" >…</div>
                                    </div>
                                <?php }?>
                                
                               </div>
                               <div class="com-activity-progress">
                                        <?php if($v['start_day']){ ?>
                                                <p class="text-center pull-left" style="background:#FF3838;"><?php echo $v['start_day'];?>天后开始</p>
                                                 <p class="text-center pull-left" style="background:#999;">活动开始中</p>
                                       <?php } else{ ?>
                                                <p class="text-center pull-left" style="background:#999;">报名</p>
                                                <p class="text-center pull-left" style="background:#FF3838;">正在进行中</p>
                                        <?php }  ?>
                               </div>
                            </a>
                            <hr class="com-contain-hr">
                        </div>
            
                <?php }else{?>
                
                <div class="com-contain">
                    <a class="com-contain-in" href="<?php echo Yii::app()->createUrl("activity/view",array('ActivityId'=>$v['id'],'type_id'=>$v['type_id'])) ;?>">
                      <div class="com-text-overflow" >
                           <div class="com-text-con" ><span class="glyphicon com-glyphicon-activity"></span><?php echo $v['title'];?></div>
                           <div class="com-text-dotted" >…</div>
                       </div>
                       <div class="com-contain-con">
                        <img src="<?php echo $v['min_banner_url'];?>" class="com-contain-img pull-left">
                        <div class="com-text-overflow" >
                          <div class="com-text-con" >时间：<?php echo $v['start_time'];?></div>
                          <div class="com-text-dotted" >…</div>
                        </div>
                        <div class="com-text-overflow" >
                          <div class="com-text-con" >类型：棋牌类</div>
                          <div class="com-text-dotted" >…</div>
                        </div>
                        <div class="com-text-overflow" >
                          <div class="com-text-con" >地址：<?php echo $v['address'];?></div>
                          <div class="com-text-dotted" >…</div>
                        </div>
                      </div>
                       <div class="com-activity-progress">

                          <?php if($v['start_day']){ ?>
                                <p class="text-center pull-left" style="background:#FF3838;"><?php echo $v['start_day'];?>天后开始</p>
                                 <p class="text-center pull-left" style="background:#999;">活动开始中</p>
                          <?php } else{ ?>
                                <p class="text-center pull-left" style="background:#999;">报名</p>
                                <p class="text-center pull-left" style="background:#FF3838;">正在进行中</p>
                            <?php }  ?>

                       </div>
                    </a>
                    <hr class="com-contain-hr">
              </div>  
                <?php }?>
                    
            
            <?php }?>
            
   
        </div>
        <!-- Others -->
        <div class="col-md-4" style="padding:0;">
            
          <div class="com-contain-nav">
            <ul class="com-others-navtabs nav" role="tablist">
              <li class="active"><a href="#MBA" role="tab" data-toggle="tab">MBA-EMBA</a><span class="caret"></span></li>
              <li><a href="#startup" role="tab" data-toggle="tab">名人名企</a><span class="caret"></span></li>
             <li><a href="#charity" role="tab" data-toggle="tab">新闻</a><span class="caret"></span></li>
            </ul>
          </div>
            
          <div class="tab-content">
              
             <div class="com-others tab-pane active" id="MBA">
               <?php  foreach($dataRightList['MBA'] as $k=>$v):?>
              <a href="<?php echo Yii::app()->createUrl("new/view",array('NewId'=>$v['id'])) ;?>" class="com-others-link">
                <div class="com-text-overflow">
                  <div class="com-text-con"><span class="com-others-num"><?php echo ($k+1);?></span> <?php echo $v['title'] ?></div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
               <?php endforeach;?>
             </div>
             <div class="com-others tab-pane" id="startup">
                <?php  foreach($dataRightList['FC'] as $k=>$v):?>
              <a href="<?php echo Yii::app()->createUrl("new/view",array('NewId'=>$v['id'])) ;?>" class="com-others-link">
                <div class="com-text-overflow">
                  <div class="com-text-con"><span class="com-others-num"><?php echo ($k+1);?></span> <?php echo $v['title'] ?></div>
                  <div class="com-text-dotted" >…</div>
               </div>
              </a>
              <hr class="com-contain-hr">
               <?php endforeach;?>
             </div>
             <div class="com-others tab-pane" id="charity">
                   <?php  foreach($dataRightList['NEW'] as $k=>$v):?>
                    <a href="<?php echo Yii::app()->createUrl("new/view",array('NewId'=>$v['id'])) ;?>" class="com-others-link">
                      <div class="com-text-overflow">
                        <div class="com-text-con"><span class="com-others-num"><?php echo ($k+1);?></span> <?php echo $v['title'] ?></div>
                        <div class="com-text-dotted" >…</div>
                     </div>
                    </a>
                    <hr class="com-contain-hr">
                 <?php endforeach;?>                 
              </div>  
           </div>
            <div class="com-others-banner">
              <a href=""><img src="/images/small_img.jpg"></a>
            </div>
         
        </div>
      </div>
    </div>
    <!-- Main Block End -->
    <!-- Second Block Start -->
    <div class="container com-second-block">
      <div class="pull-left">
        <div class="com-mrmq-title">名人名企</div>
        <a href="" class="com-mrmq-link"><span class="glyphicon glyphicon-th-large"></span> 更多</a>
      </div>
      <div class="com-mrmq">
          <?php for($i=0;$i<=2;$i++):?> 
            <a href="">
              <img src="<?php echo $dataRightList['FC'][$i]['min_banner_url']?>" class="pull-left">
              <p class="com-mrmq-con1"><?php echo $dataRightList['FC'][$i]['title']?>...</p>
              <p class="com-mrmq-con2"><?php echo $dataRightList['FC'][$i]['content']?></p>
            </a>
          <?php endfor;?>
      </div>
    </div>
    
    
    
    <div class="container com-second-block">
      <div class="pull-left">
        <div class="com-schools-title">合作院校</div>
        <a href="" class="com-schools-link"><span class="glyphicon glyphicon-th-large"></span> 全部</a>
      </div>
      <div class="com-schools">
	  
		  <?php foreach ($dataRightList['school'] as $k=>$v):?>
                <a href="">
                  <img src="<?php echo $v['banner_url']?>">
                  <p><?php echo $v['name']?></p>
                </a>
          <?php endforeach;?>
        
        <a href="<?php echo Yii::app()->createUrl("school/index") ;?>">
          <div class="com-schools-more"></div>
        </a>
      </div>
    </div>
    <!-- Second Block End -->

